#include "fakedstl.h"
#include<memory>

using fakedSTL::BITree;

int main(void) {

	std::vector<int> arr{ 1, 2, 3, 4, 5, 6, 7 };


	auto Tarray = std::make_shared<BITree<int>>(arr);
	
	Tarray->modify(Tarray->begin(), Tarray->begin() + 3, 5); 
	int i = 0;
	while (i <= 6) {
		std::cout << Tarray->get(Tarray->begin() + i) << " ";
		++i;
	}
	std::cout << std::endl;
	std::cout << Tarray->sum(Tarray->cbegin(), Tarray->cend()) << std::endl;
	
	
	return 0;
}